package com.sa.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sa.bean.entity.UserFeatureDO;
import com.sa.mapper.UserFeatureMapper;
import com.sa.service.UserFeatureService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserFeatureServiceImpl extends ServiceImpl<UserFeatureMapper, UserFeatureDO>
        implements UserFeatureService {
    @Override
    public List<UserFeatureDO> selectById(Long userId) {
        if (userId == null){
            return null;
        }
        LambdaQueryWrapper<UserFeatureDO> lqw =
                Wrappers.<UserFeatureDO>lambdaQuery().eq(UserFeatureDO::getUserId, userId);
        return list(lqw);
    }
}
